/*
 * Decompiled with CFR.
 *
 * Could not load the following classes:
 *  com.ishanggang.entity.ShopQuechao
 *  com.ishanggang.mapper.ShopQuechaoMapper
 */
package com.ishanggang;

import com.ishanggang.entity.ShopQuechao;
import com.ishanggang.mapper.ShopQuechaoMapper;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@EnableAutoConfiguration
@MapperScan(value = {"com.ishanggang.mapper"})
@ComponentScan(value = {"com.ishanggang"})
public class Application {
    @Resource
    ShopQuechaoMapper shopQuechaoMapper;
    @Autowired
    private RedisTemplate redisTemplate;
    private static final Logger logger = LoggerFactory.getLogger(Application.class);

    @RequestMapping(value = {"/"})
    String home() {
        ShopQuechao shopQuechao = this.shopQuechaoMapper.selectById(Long.valueOf(2087L));
        redisTemplate.opsForValue().set("def1","def");
        return "Hello World!" + redisTemplate.opsForValue().get("def1")+"---"+this.redisTemplate.opsForValue().get("abc") + "-----" + shopQuechao;
    }



    @RequestMapping(value = {"/message"})
    String message(@RequestBody Object message){
        logger.info("-----------------------=======================------{}", message);
        return "";
    }

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}